﻿<local:DocumentBase x:Class="WPFExcelReport.ITXSETUP"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase" 
                    xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core" 
                    xmlns:wep="clr-namespace:WPFExcelReport" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:tra="clr-namespace:WPFExcelReport.TranslationByMarkupExtension;assembly=ReflectionStudio.Core"
        Title="参数设定"   HorizontalAlignment="Stretch"
                    Loaded="Window_Loaded"
                    VerticalAlignment="Stretch"
                    Height="400"
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <db:SETINTEXDB  x:Key="SetEnv" />
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="SetProd" />
        <CollectionViewSource  x:Key="vwHRSTAMM" Source="{Binding Path=HRSTAMM,Source={StaticResource SetEnv}}"/>
        <CollectionViewSource  x:Key="vwICC_FUNCTIONS" Source="{Binding Path=ICC_FUNCTIONS,Source={StaticResource SetEnv}}"/>
        <CollectionViewSource  x:Key="vwFUNCTION" Source="{Binding Path=ICC_FUNCTIONS,Source={StaticResource SetData}}"/>
        <CollectionViewSource  x:Key="vwFOLDER" Source="{Binding Path=ICC_FOLDERS,Source={StaticResource SetData}}"/>
        <CollectionViewSource  x:Key="vwMENU" Source="{Binding Path=ICC_MENUDEF,Source={StaticResource SetData}}"/>
        <CollectionViewSource  x:Key="vwTMPFUNCTION" Source="{Binding Path=ICC_FUNCTIONS,Source={StaticResource SetProd}}"/>
        <CollectionViewSource  x:Key="vwTMPMENU" Source="{Binding Path=ICC_MENUDEF,Source={StaticResource SetProd}}"/>
        <CollectionViewSource  x:Key="vwTMPFOLDER" Source="{Binding Path=ICC_FOLDERS,Source={StaticResource SetProd}}"/>
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition   Height="Auto" />
            <RowDefinition  Height="*" />
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="5" >
            <WrapPanel>
                <StackPanel>
                    <Button  Height="40"  Width="40" Margin="0,0,0,0" Name="btnGetCADMap" 
                         KeyboardNavigation.TabIndex="3" IsDefault="True">
                        <Button.Background>
                            <ImageBrush ImageSource="/IntexReportClient;component/Images/Reload.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock>重新生成接口定义</TextBlock>
                </StackPanel>
                <StackPanel>
                    <Button  Name="cmdSaveMap"  Width="40" Height="40">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/Upload.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock>加载接口定义</TextBlock>
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <TabControl Grid.Row="1">
            <TabItem Header="菜单管理">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>
                    <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                        <WrapPanel >
                            <Button Margin="15,0,0,0" Content="装载本地" Click="butMenuLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="下载" Click="butMenuITXLoad_Click"></Button>
                            <Button Margin="15,0,0,0" Content="复制" Click="butMenuCopy_Click"></Button>
                            <Button Margin="15,0,0,0" Content="编辑" Click="butMenuEdit_Click"></Button>
                            <Button Margin="15,0,0,0" Content="全部复制" Click="butMenuCopyAll_Click"></Button>
                            <Button Margin="15,0,0,0" Content="新建" Click="butNewMenu_Click"></Button>
                            <Button Margin="15,0,0,0" Content="取消" Click="butDiscard_Click"></Button>

                            <Button Margin="15,0,0,0" Content="保存" Click="butMenuSave_Click"></Button>
                            <TextBlock>当前用户菜单更改要复制为新用户，名称可以一样</TextBlock>
                        </WrapPanel>
                        <WrapPanel>
                            <TextBlock >当前用户</TextBlock>
                            <ComboBox  Name="txtCurrentUser"
                                       Text="{Binding USERID,Source={ StaticResource ResourceKey=vwMENU}}" 
                                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwMENU}}"
                                       Background="Yellow"  MinWidth="100"  
                                       DisplayMemberPath="USERID"
                                       IsEditable="True"
                                       SelectedValuePath="USERID"
                                       >
                            </ComboBox>
                            <TextBlock>目标用户</TextBlock>
                            <ComboBox  Name="txtNewUser"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwHRSTAMM}}"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="HRBENID"
                                       IsEditable="True"
                                      SelectedValuePath="HRBENID"
                                       >
                            </ComboBox>
                            <Button Width="Auto" Margin="10,0,0,0"  HorizontalAlignment="Left"  Click="btnFilterMENU_Click">过滤</Button>
                            <Button Width="Auto"  Margin="10,0,0,0" HorizontalAlignment="Left"  Click="btnFilterMenuClear_Click">清除</Button>
                            <Button Width="Auto"  Margin="10,0,0,0" HorizontalAlignment="Left"  Click="btnFilterMenuHidden_Click">整理</Button>
                        </WrapPanel>
                        <WrapPanel>
                            <WrapPanel>
                                <TextBlock>用户</TextBlock>
                                <ComboBox   
                                     Text="{Binding USERID,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwHRSTAMM}}"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="HRBENID"
                                       IsEditable="True"
                                      SelectedValuePath="HRBENID"
                                       >
                                </ComboBox>
                                <TextBlock>处理</TextBlock>
                                <ComboBox  
                                    Text="{Binding PROCESS,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                    Background="Gray"  MinWidth="100"  
                                    IsEditable="True"
                                    >
                                    <ComboBoxItem>MENU</ComboBoxItem>
                                    <ComboBoxItem>HIDDEN</ComboBoxItem>
                                </ComboBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock>位置</TextBlock>
                                <ComboBox  
                                    Text="{Binding FATHER,Source={ StaticResource ResourceKey=vwTMPMENU}}" 
                                    Background="Gray"  MinWidth="100"  
                                    IsEditable="True"
                                    >
                                    <ComboBoxItem ToolTip="工艺管理">gpArticle</ComboBoxItem>
                                    <ComboBoxItem ToolTip="单证">gpDoc</ComboBoxItem>
                                    <ComboBoxItem ToolTip="销售部">gpSales</ComboBoxItem>
                                    <ComboBoxItem ToolTip="计划部">gpPlan</ComboBoxItem>
                                    <ComboBoxItem ToolTip="计划-原料供应">gpMaterilaSupply</ComboBoxItem>
                                    <ComboBoxItem ToolTip="计划-仓库">gpMaterial</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-浆纱">gpSizing</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-染纱">gpDye</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-生产">gpProd</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-生产">gpProduction</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-产量">gpOutput</ComboBoxItem>
                                    <ComboBoxItem ToolTip="统计-成品">gpFinish</ComboBoxItem>
                                    <ComboBoxItem ToolTip="采购部">gpEK</ComboBoxItem>
                                    <ComboBoxItem ToolTip="仓库管理">gpWarehouse</ComboBoxItem>
                                    <ComboBoxItem ToolTip="质量">gpWS03</ComboBoxItem>
                                    <ComboBoxItem ToolTip="计划部">gbSales</ComboBoxItem>
                                    <ComboBoxItem ToolTip="计划部">gpPlan</ComboBoxItem>
                                    <ComboBoxItem ToolTip="综合">gpGreige</ComboBoxItem>
                                    <ComboBoxItem ToolTip="财务">gpINOUTINV</ComboBoxItem>
                                    <ComboBoxItem ToolTip="系统设定">gpSystem</ComboBoxItem>
                                </ComboBox>
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock>功能名称</TextBlock>
                                <TextBox Background="White"  FontSize="14"   Margin="10,0,0,0"  Width="120"  
                                 Text="{Binding HEADER,Converter={StaticResource ResourceKey=gb2312}, Source={ StaticResource ResourceKey=vwTMPMENU}}" CharacterCasing="Upper" />
                            </WrapPanel>
                            <WrapPanel>
                                <TextBlock>功能</TextBlock>
                                <ComboBox 
                                     Text="{Binding TAG,Source={ StaticResource ResourceKey=vwTMPMENU}}"
                                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwICC_FUNCTIONS}}"
                                    SelectionChanged="cmbFunction_SelectionChanged"
                                Background="Gray"  MinWidth="100"  
                                       DisplayMemberPath="TYPE"
                                       IsEditable="True"
                                      SelectedValuePath="TYPE"
                                       >
                                </ComboBox>
                            </WrapPanel>
                        </WrapPanel>
      
                    </StackPanel>
                    <DataGrid Grid.Row="1" Grid.Column="0"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              Name="dlgMenu"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMENU}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="1" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="公司"   Width="Auto"  MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=USERID}" Header="USERID"  Width="Auto" MinWidth="30"/>
                            <DataGridTextColumn Binding="{Binding Path=PROCESS}" Header="处理"  Width="Auto" MinWidth="60"/>                                                        
                            <DataGridTextColumn Binding="{Binding Path=FATHER}" Header="FATHER"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=HEADER, Converter={StaticResource ResourceKey=gb2312}}" Header="功能"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TAG}" Header="TAG"  Width="Auto" MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=ICON}" Header="ICON"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUID}" Header="MENUID"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUITEM}" Header="MENUITEM"   Width="Auto"  MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=LARGEICON}" Header="LARGEICON"  Width="Auto" MinWidth="40"/-->
                        </DataGrid.Columns>
                    </DataGrid>

                    <DataGrid Grid.Row="1" Grid.Column="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPMENU}}"  
                              HeadersVisibility="Column"
                            VerticalAlignment="Stretch"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="公司"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=USERID}" Header="USERID"  Width="Auto" MinWidth="30"/>
                            <DataGridTextColumn Binding="{Binding Path=PROCESS}" Header="处理"  Width="Auto" MinWidth="60"/>                       
                            <DataGridTextColumn Binding="{Binding Path=FATHER}" Header="FATHER"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TAG}" Header="TAG"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=HEADER, Converter={StaticResource ResourceKey=gb2312}}" Header="功能"  Width="Auto" MinWidth="40"/>
                                <!--DataGridTextColumn Binding="{Binding Path=ICON}" Header="ICON"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUID}" Header="MENUID"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=MENUITEM}" Header="MENUITEM"   Width="Auto"  MinWidth="60"/>
                            <DataGridTextColumn Binding="{Binding Path=LARGEICON}" Header="LARGEICON"  Width="Auto" MinWidth="40"/-->
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="功能定义">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="1*" />
                        <ColumnDefinition Width="1*"/> 
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.ColumnSpan="2" Margin="0,0,-0.2,0">
                        <Button Margin="15,0,0,0" Content="装载本地" Click="butFunctionLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="下载" Click="butFunctionITXLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="编辑" Click="butFunctionEdit_Click"></Button>
                        <Button Margin="15,0,0,0" Content="复制" Click="butFunctionCopy_Click"></Button>
                        <Button Margin="15,0,0,0" Content="全部复制" Click="butFunctionCopyAll_Click"></Button>
                        <Button Margin="15,0,0,0" Content="保存" Click="butFunctionSave_Click"></Button>
                        <Button Margin="15,0,0,0" Content="取消" Click="butDiscard_Click"></Button>
                        <TextBlock>ROWNID</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="60" />
                        <TextBlock>TYPE</TextBlock>
                        <TextBox Name="txtType"  HorizontalAlignment="Left" Margin="3" KeyDown="txtFunctionType_KeyDown"
                                   Text="{Binding Path=TYPE, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock>回车FULLNAME</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=FULLNAME, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock>FILENAME</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=FILENAME, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                        <TextBlock>描述</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}, Source={StaticResource ResourceKey=vwTMPFUNCTION}}" VerticalAlignment="Center" Width="120" />
                    </WrapPanel>
                    <DataGrid  Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwFUNCTION}}"  
                              HeadersVisibility="Column"                           
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="0,0,0,0" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="TYPE"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=NAMESPACE}" Header="NAMESPACE"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FULLNAME}" Header="FULLNAME"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FILENAME}" Header="FILENAME"  Width="Auto" MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}}" Header="描述"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPFUNCTION}}"  
                              HeadersVisibility="Column"                               
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Margin="211,0,0.6,-7" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=TYPE}" Header="TYPE"   Width="Auto"  MinWidth="40"/>
                            <!--DataGridTextColumn Binding="{Binding Path=NAMESPACE}" Header="NAMESPACE"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FULLNAME}" Header="FULLNAME"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=FILENAME}" Header="FILENAME"  Width="Auto" MinWidth="40"/-->
                            <DataGridTextColumn Binding="{Binding Path=DESCRIPTION, Converter={StaticResource ResourceKey=gb2312}}" Header="描述"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
            <TabItem Header="目录管理">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition   Height="Auto" />
                        <RowDefinition   Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition  Width="91*" />
                        <ColumnDefinition Width="319*"/>
                        <ColumnDefinition Width="411*"/>
                    </Grid.ColumnDefinitions>
                    <WrapPanel Grid.Row="0" Grid.ColumnSpan="3">
                        <Button Margin="15,0,0,0" Content="装载本地" Click="butFolderLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="下载" Click="butFolderITXLoad_Click"></Button>
                        <Button Margin="15,0,0,0" Content="复制" Click="butFolderCopy_Click"></Button>
                        <Button Margin="15,0,0,0" Content="全部复制" Click="butFolderCopyAll_Click"></Button>
                        <Button Margin="15,0,0,0" Content="保存" Click="butFolderSave_Click"></Button>
                        <Button Margin="15,0,0,0" Content="取消" Click="butDiscard_Click"></Button>
                        <TextBlock>ROWNID</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROWNID, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="40" />
                        <TextBlock>COMPANY</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=COMPANY, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="40" />
                        <TextBlock>ROOT</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=ROOT, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="160" />
                        <TextBlock>SUB</TextBlock>
                        <TextBox   HorizontalAlignment="Left" Margin="3" Text="{Binding Path=SUB, Source={StaticResource ResourceKey=vwTMPFOLDER}}" VerticalAlignment="Center" Width="160" />
                    </WrapPanel>
                    <DataGrid  Grid.Row="1" Grid.Column="0"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwFOLDER}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" Grid.ColumnSpan="3" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="COMPANY"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=ROOT}" Header="ROOT"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=SUB}" Header="SUB"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                    <DataGrid  Grid.Row="1" Grid.Column="2"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTMPFOLDER}}"  
                              HeadersVisibility="Column"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=ROWNID}" Header="ROWNID"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=COMPANY}" Header="COMPANY"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=ROOT}" Header="ROOT"  Width="Auto" MinWidth="20"/>
                            <DataGridTextColumn Binding="{Binding Path=SUB}" Header="SUB"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</local:DocumentBase>
